<?php
    require "../../system/framework.php";  
    
    $table = "[php_property:table]";
    $urlField = "[php_property:url_field]";
    
    db::addTableField($table, "__template", "int(11)");
    
    $template = "source.html";
    
    $templateId = db::getValue("SELECT id FROM _template WHERE template='$template'");
    
    
    $data = new data($table);
    do {                                  
        
        $dataUpdate = array();
        $dataUpdate['_url'] = convert::convertToUrl($data->data['source']);     
        //$dataUpdate['source'] =  $data->data['source'];
        $dataUpdate['__template'] = $templateId;
        $dataUpdate['id2'] =  $data->data['id2'];
        db::saveData($table, $dataUpdate);    
        
        
        
    } while($data->nextRow());
    
    
    http::redirect("");
    
    
    
?>
